



<%@page contentType="text/html; UTF-8"  pageEncoding="UTF-8" isELIgnored="false" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
	<head>
		<title>emplist</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css" />
	</head>
	<body>
		<div id="wrap">
			<div id="top_content"> 
				<div id="header">
						<div id="rightheader">
							<p>
                                当前用户：${sessionScope.user.username}
								<c:if test="${sessionScope.user != null}">
									<a href="${pageContext.request.contextPath}/user/logout">退出</a>
								</c:if>
								<c:if test="${sessionScope.user == null}">
									<a href="${pageContext.request.contextPath}/login.jsp">登录</a>
								</c:if>

								<br />
							</p>
						</div>
						<div id="topheader">
							<h1 id="title">
								<a href="#">通讯录</a>
							</h1>
						</div>
					<div id="navigation">
					</div>
				</div>
				<div id="content">
					<p id="whereami">
					</p>
					<h1>
						Welcome ${sessionScope.user.username}!
					</h1>
					<p>
						<a href="${pageContext.request.contextPath}/addEmp.jsp">添加联系人</a>
					</p>
					<table class="table">
						<tr class="table_header">
							<td>
								ID
							</td>
							<td>
								Name
							</td>
							<td>
								Salary
							</td>
							<td>
								birthday
							</td>
							<td>
								Operation
							</td>
						</tr>
						<c:forEach var="emp" items="${requestScope.emps}">
							<tr class="row2">
								<td>
									${emp.id}
								</td>
								<td>
									${emp.name}
								</td>
								<td>
									${emp.salary}
								</td>
								<td>
									${emp.birthday}
								</td>
								<td>
									<a href="${pageContext.request.contextPath}/emp/queryOne?id=${emp.id}">修改</a>&nbsp;
									<a href="${pageContext.request.contextPath}/emp/remove?id=${emp.id}">删除</a>
								</td>
							</tr>
						</c:forEach>
					</table>
				</div>
			</div>
			<div id="footer">
				<div id="footer_bg">
				ABC@126.com
				</div>
			</div>
		</div>
	</body>
</html>
